package edu.jamestang.yeb.controller;


import edu.jamestang.yeb.entity.Menu;
import edu.jamestang.yeb.service.MenuService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author JamesTang
 * @date 2021/12/13 23:08
 */
@RestController
@RequestMapping("/system/cfg")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @ApiOperation(value = "Query menu by user id")
    @GetMapping("/menu")
    public List<Menu> getMenuByAdminId(){
        return menuService.getMenusByAdminId();
    }
}
